package org.example.common.login;

/**
 * @author 宋孟林
 * @description
 * @date: 2025/5/25 15:00
 */
public class LoginUserHolder {
    private final static ThreadLocal<LoginUser> threadLocal = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser){
        threadLocal.set(loginUser);
    }

    public static LoginUser getLoginUser(){
        return threadLocal.get();
    }

    public static void remove(){
        threadLocal.remove();
    }

}
